import React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import Index from '../containers/index/index'
import order from '../containers/order'
import query from '../containers/query'
import ticket from '../containers/ticket'
import selectCity from '../containers/index/selectCity'

import todolist from '../containers/todolist/index'
import useDemo from '../usehooks/useDemo'
import bindAction from '@/components/bindActionCreator/index'
import Book from '@/containers/book/book'


const RouterView = () => {
  return <Switch>
    <Route path="/index" component={Index}></Route>
    <Route path="/order" component={order}></Route>
    <Route path="/query" component={query}></Route>
    <Route path="/ticket" component={ticket}></Route>
    <Route path="/select" component={selectCity}></Route>
    <Route path="/todo" component={todolist}></Route>
    <Route path="/usedemo" component={useDemo}></Route>
    <Route path="/bind" component={bindAction}></Route>
    <Route path="/book" component={Book}></Route>

    <Redirect to="/index" from="/" />
  </Switch>
}

export default RouterView;